<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="com.doone.telmarket.domain.ServicePage"%><html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Insert title here</title>
<script src="${pageContext.request.contextPath}/js/jquery.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.ui.draggable.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.alerts.js" type="text/javascript"></script>
<link href="${pageContext.request.contextPath}/css/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" rev="stylesheet"
	href="${pageContext.request.contextPath}/css/admin/style-admin.css"/>
<script type="text/javascript">
$(document).ready(function(){
	$("#saveService").click(function(){
		$.ajax({
		    url: 'saveOpration?saveType=<%=request.getParameter("saveType")  %>',
		    type: 'POST',
		    timeout: 5000,
		    error: function(){
		    	jAlert('获取数据失败','消息');
		    },
		    success: function(msg){
		    	jAlert(msg,'消息');
		        if(msg!="生成页面失败"){
		        	$("#saveService").remove();
				}	
		    }
		});
		
	});
});
</script>
</head>
<body>
  <div><h1>操作成功</h1></div>
  <a href="${request.page}">返回</a>
  <%
  	if(request.getAttribute("servicePage")!=null){
  		
  		request.getSession().setAttribute("servicePage",request.getAttribute("servicePage"));
  		ServicePage servicePage = (ServicePage)request.getAttribute("servicePage");
  		%>
  		   <a href="${pageContext.request.contextPath}/admin/serviceTemplet.jsp" target="_blank">预览页面</a>
  		　<input type="button" value="生成页面"  class="button" id="saveService"> 
  		<%
  	}
  %>
</body>
</html>